cmake_minimum_required(VERSION 3.22)

project(myApp)
add_library(myApp INTERFACE)

# Enable CMake support for ASM and C languages
enable_language(C ASM)

target_compile_definitions(myApp INTERFACE 
    USE_HAL_DRIVER 
	STM32F411xE
    $<$<CONFIG:Debug>:DEBUG>
)

target_include_directories(myApp INTERFACE
    ../../Apps/
)

file(GLOB COMPONENT_SRCS ../../Apps/*.c)

target_sources(myApp INTERFACE
    ${COMPONENT_SRCS}
 
    # ../../Apps/app_di.c

)


target_link_directories(myApp INTERFACE
)

target_link_libraries(myApp INTERFACE
)

# Validate that STM32CubeMX code is compatible with C standard
if(CMAKE_C_STANDARD LESS 11)
    message(ERROR "Generated code requires C11 or higher")
endif()


